module lang.d.types.functiontype;

import lang.d.types.dtype;
import lang.d.sts.declarations.dparameterlist;

enum FunctionAttribute: ubyte {
    NONE = 0,
    PURE = 1,
    NOTHROW = 2
}

class FunctionType: DType {
    private DType myResultType;
    private bool myDelegateFlag;
    private DParameterList myParameterList;
    private FunctionAttribute myAttribute;

    public this(DType type, bool delegateFlag) {
        myResultType = type;
        myDelegateFlag = delegateFlag;
    }

    public void setParameterList(DParameterList parameterList) {
        myParameterList = parameterList;
    }

    public void setAttributeFlag(FunctionAttribute attribute) {
        myAttribute |= attribute;
    }
}
